package com.rich.live.thread;

public class a {

    public static void main(String[] args) {

        //查看电脑处理器的核
        System.out.println(Runtime.getRuntime().availableProcessors());
//返回java虚拟机试图最大的内存量
        long maxMemory = Runtime.getRuntime().maxMemory();
//返回java虚拟机中的内存总量

        long totalMemory = Runtime.getRuntime().totalMemory();
        System.out.println("-Xmx:MAX_MEMORY=" + maxMemory + "（字节）、" + (maxMemory / (double) 1024 / 1024) + "MB");
        System.out.println("-Xms:TOTAL_MEMORY=" + totalMemory + "（字节）、" + (totalMemory / (double) 1024 / 1024) + "MB");
    }

}
